﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;

namespace MUD.Lib.Objects
{
    /// <summary>
    /// Base MUD Object
    /// </summary>
    [Serializable]
    internal class MudObject
    {
        public Guid guid;
        public string ShortDesc = "";
        public string LongDesc = "";
        public Collection<string> ID = new Collection<string>();
        public Container Environment;

        public MudObject()
        {
            guid = Guid.NewGuid();
        }

        public virtual bool Move(Container target)
        {
            if (target == null || target.Full)
            {
                return false;
            }

            if (Environment != null)
            {
                Environment.Remove(this);
            }
            target.Add(this);
            Environment = target;
            return true;
        }
    }
}
